from plugin import plugin
import random

__doc__ = "hi"

class hi(plugin):
	"Hi plugin - Says hey!"
	
	def __init__(self):
		self._version = '3.0 stable'
		self.greetings = ['hiii', 'lo', 'hi', 'hello', 'hey', 'hai', 'o/']

	def hi(self, msg, args):
		self._irc.reply(msg, 'Hey!')

	def _onMessage(self, msg):
		if msg['data'] in self.greetings or msg['type'] == 'join':
			self._irc.privmsg(msg['channel'], random.choice(self.greetings))
